package com.x.Part5_接口.Car;

/**
 * ClassName: OilCar
 * Package: IntelliJ IDEA
 * Description:
 * Written by HanXu
 * Create 2024.03.05 20:36
 */
public class OilCar extends Vehicle implements IPower{

    private String carNumber;
    public OilCar() {
    }

    public OilCar(String brand, String color, String carNumber) {
        super(brand, color);
        this.carNumber = carNumber;
    }

    public String getCarNumber() {
        return carNumber;
    }

    public void setCarNumber(String carNumber) {
        this.carNumber = carNumber;
    }

    @Override
    public void run() {
        System.out.println("开油车");
    }

    @Override
    public void power() {
        System.out.println("汽车加汽油");
    }
}
